<template>
	<view>
		<cu-custom :isBack="true">
			<block slot="backText">{{doc.title}}</block>
		</cu-custom>
		<view class="margin-left margin-right">
			<mp-html v-if="doc.fileType === 'html'" :content="doc.msg"  />
		</view>
	</view>
</template>

<script>
	import * as iotDocSystemApi from '@/api/iot/iotDocSystemApi.js'
	import mpHtml from '@/uni_modules/mp-html/components/mp-html/mp-html.vue'
	export default {
		data() {
			return {
				doc: {},
				id: null
			}
		},
		computed: {
			themeConfig() {
				return this.$store.state.themeConfig
			}
		},
		components: {
			mpHtml
		},
		onLoad(option) {
			this.id = option.id
			this.getSystemDoc()
		},
		methods: {
			
			getSystemDoc() {
				iotDocSystemApi.getSystemDoc({
					id: this.id
				}).then(res => {
					const {
						data
					} = res
					this.doc = data
				})
			}
		}
	}
</script>

<style>

</style>
